package com.gzy.cbrsystem.insomnia.action.reasoning;

import com.opensymphony.xwork2.ActionSupport;

import com.gzy.cbrsystem.insomnia.ClinicalBit;
import com.gzy.cbrsystem.insomnia.InsomniaClinical2;
import com.gzy.cbrsystem.insomnia.ClinicalBitDAO;

import com.gzy.cbrsystem.insomnia.action.reasoning.ReadInsomniaClinicalAction;
public class ViewCaseClinicalAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected String caseId;
	protected InsomniaClinical2 insomniaClinical2;
	protected ClinicalBitDAO clinicalBitDAO;
	
	protected ReadInsomniaClinicalAction readInsomniaClinicalAction;
	public String getCaseId() {
		return caseId;
	}
	public void setCaseId(String caseId) {
		this.caseId = caseId;
	}
	
	public InsomniaClinical2 getInsomniaClinical2() {
		return insomniaClinical2;
	}
	public void setInsomniaClinical2(InsomniaClinical2 insomniaClinical2) {
		this.insomniaClinical2 = insomniaClinical2;
	}
	
	public ClinicalBitDAO getClinicalBitDAO() {
		return clinicalBitDAO;
	}
	public void setClinicalBitDAO(ClinicalBitDAO clinicalBitDAO) {
		this.clinicalBitDAO = clinicalBitDAO;
	}
	
	public ReadInsomniaClinicalAction getReadInsomniaClinicalAction() {
		return readInsomniaClinicalAction;
	}
	public void setReadInsomniaClinicalAction(
			ReadInsomniaClinicalAction readInsomniaClinicalAction) {
		this.readInsomniaClinicalAction = readInsomniaClinicalAction;
	}
	public String execute()throws Exception{
		
		this.setInsomniaClinical2((InsomniaClinical2)this.getReadInsomniaClinicalAction().translate2((ClinicalBit)this.getClinicalBitDAO().findById(this.caseId)));
		return SUCCESS;
		}
}
